< previous page page_425 next page >

Page 425
9f31265bb40b592b1929e18a47ab28e5.gif
      For intLoop = 0 To .FontCount - 1
         lstFonts.AddItem .Fonts(intLoop)
      Next intLoop
   End With
End Sub
Using the FontCount property, you can determine how many fonts are installed on a particular machine. You can then use the Fonts property to add each individual font to the list box.
Changing the Mouse Pointer
When performing a long operation, youll need to inform the user that something is happening. One of the most common methods is to change the mouse pointer to an hourglass icon. You can accomplish this by setting the MousePointer property of the Screen object. Heres some sample code showing the use of the built-in constants for setting the appropriate cursor:
9f31265bb40b592b1929e18a47ab28e5.gif
Screen.MousePointer = vbHourglass
...
...
Screen.MousePointer = vbDefault
You have 17 different cursors available to you in the Visual Basic environment. Table 21.5 shows you the different settings and the constants that should be used to set each one.
Table 21.5 Cursor Types.
Value to SetDescriptionConstant Name
0DefaultvbDefault
1ArrowvbArrow
2Cross hairvbCrosshair
3I-beamvbIbeam
4IconvbIconPointer
5SizingvbSizePointer
6Sizing (NE, SW)vbSizeNESW
7Sizing (N, S)vbSizeNS

(table continued on next page)

 
< previous page page_425 next page >

If you like this book, buy it!